|
linhall2 2.2.1
|
API for configuring and manipulating LIN Hall 2 Click driver. More...
Topics | |
| LIN Hall 2 Registers Settings | |
| Settings for registers of LIN Hall 2 Click driver. | |
| LIN Hall 2 MikroBUS Map | |
| MikroBUS pin mapping of LIN Hall 2 Click driver. | |
Functions | |
| void | linhall2_cfg_setup (linhall2_cfg_t *cfg) |
| LIN Hall 2 configuration object setup function. | |
| err_t | linhall2_init (linhall2_t *ctx, linhall2_cfg_t *cfg) |
| LIN Hall 2 initialization function. | |
| err_t | linhall2_read_an_pin_value (linhall2_t *ctx, uint16_t *data_out) |
| LIN Hall 2 read AN pin value function. | |
| err_t | linhall2_read_an_pin_voltage (linhall2_t *ctx, float *data_out) |
| LIN Hall 2 read AN pin voltage level function. | |
| void | linhal2_set_en_pin (linhall2_t *ctx, uint8_t pin_state) |
| LIN Hall 2 set EN pin state function. | |
| err_t | linhal2_get_flux_density (linhall2_t *ctx, float *data_out) |
| LIN Hall 2 read flux density function. | |
API for configuring and manipulating LIN Hall 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| err_t linhal2_get_flux_density | ( | linhall2_t * | ctx, |
| float * | data_out ) |
LIN Hall 2 read flux density function.
This function reads magnetic flux density in mT.
| [in] | ctx | : Click context object. See linhall2_t object definition for detailed explanation. |
| [out] | data_out | : Magnetic flux density in mT. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void linhal2_set_en_pin | ( | linhall2_t * | ctx, |
| uint8_t | pin_state ) |
LIN Hall 2 set EN pin state function.
This function is used to set EN pin state of the LIN Hall 2 Click board.
| [in] | ctx | : Click context object. See linhall2_t object definition for detailed explanation. |
| [in] | pin_state | : State of the EN pin state. |
| void linhall2_cfg_setup | ( | linhall2_cfg_t * | cfg | ) |
LIN Hall 2 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See linhall2_cfg_t object definition for detailed explanation. |
| err_t linhall2_init | ( | linhall2_t * | ctx, |
| linhall2_cfg_t * | cfg ) |
LIN Hall 2 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See linhall2_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See linhall2_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t linhall2_read_an_pin_value | ( | linhall2_t * | ctx, |
| uint16_t * | data_out ) |
LIN Hall 2 read AN pin value function.
This function reads results of AD conversion of the AN pin.
| [in] | ctx | : Click context object. See linhall2_t object definition for detailed explanation. |
| [out] | data_out | : Output ADC result. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t linhall2_read_an_pin_voltage | ( | linhall2_t * | ctx, |
| float * | data_out ) |
LIN Hall 2 read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
| [in] | ctx | : Click context object. See linhall2_t object definition for detailed explanation. |
| [out] | data_out | : Output voltage level of the analog pin [V]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.